package com.daybook.service;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.daybook.pojo.Books;
import com.daybook.pojo.BooksAndCategory;
import com.daybook.util.PageHelp;

//书籍管理service接口
public interface BooksService {
	/****************用户**********************/
	//1.查询最新上架的书籍
	public List<Books> getBooksByNewTime( int count);
	//2.销量排行榜
	public List<Books> getBooksByNewSaleNum( int count);
	//3.主页类别查询
	public List<Books> getBooksByCname(String came);
	//4.主页类别查询
	public PageHelp getBooksByCondition(Map<String, Object> map,Integer pageNow);
	//5.根据ID查询单本书籍
	public BooksAndCategory getBookByBid(int id);
	/****************管理员**********************/
	//添加新书
	public int addNewBook(Books books);
	//分页查询书的信息
	public PageHelp getBooksPageList(Map<String, Object> map,Integer pageNow);
	 //修改书的状态
	 int changeBookState(int bid,int bstate);
	 //更新数据信息
	 int changeBookInfo(Books books);
	 //编号验证
	 int getBnum(String bnum);
	 //统计
		List<Books> getTop9Books();
}
